package com.smartao.base.acl;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;

import com.smartao.core.dao.BaseEntityDao;

@Repository
public class AccessEntryDaoImpl extends BaseEntityDao<AccessEntry, Long> implements AccessEntryDao{

	@SuppressWarnings("unchecked")
	@Override
	public List<AccessEntry> findByEntityId(Long entityId) {
		Criteria criteria = createCriteria();
		criteria.add(Restrictions.eq("entityId", entityId));
		return criteria.list();
	}

}
